package org.fujay.langchain4jserver.domain.knowledge.event;

import lombok.Getter;
import org.fujay.langchain4jserver.domain.knowledge.vo.FileId;
import org.fujay.langchain4jserver.domain.knowledge.vo.KnowledgeBaseId;
import org.springframework.context.ApplicationEvent;

/**
 * Domain Event indicating a file failed during the indexing process.
 */
@Getter
public class FileIndexingFailed extends ApplicationEvent {

    // Getters
    private final KnowledgeBaseId knowledgeBaseId;
    private final FileId fileId;
    private final String errorMessage;

    public FileIndexingFailed(
            Object source, KnowledgeBaseId knowledgeBaseId, FileId fileId, String errorMessage) {
        super(source);
        this.knowledgeBaseId = knowledgeBaseId;
        this.fileId = fileId;
        this.errorMessage = errorMessage;
    }
}
